package yc.gg.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import yc.gg.domain.dto.CommentDTO;
import yc.gg.domain.dto.PostDTO;
import yc.gg.domain.dto.ReplyDTO;
import yc.gg.domain.po.Post;
import yc.gg.domain.po.Reply;
import yc.gg.domain.req.CommentReq;

import java.util.List;

/**
 * \* User: Fuyue
 * \* Date: 2025/6/10
 * \* Description:
 * \
 */
@Mapper
public interface PostMapper {
    void post(Post post);

    List<Post> get(@Param("offset") int offset ,@Param("pageSize") int pageSize);

    PostDTO getById(String id);

    void insertComment(CommentReq commentReq);

    List<CommentDTO> commentList(@Param("postId") String postId,@Param("offset")int offset,@Param("pageSize")int pageSize);

    List<ReplyDTO> getRepliesByCommentIds(List<String> commentIds);

    int insert(Reply reply);

    List<Post> mine(String openid);

}
